package com.yan.movie.controller;

import com.yan.movie.services.ServiceImpl;

import java.util.Scanner;

/**
 * @author taoge
 * @Date 2024/8/1 16:53
 * @Description
 */
public class ControllerIndex {
    public static final Scanner INPUT = new Scanner(System.in);
    public static final ServiceImpl serviceImpl = new ServiceImpl();
    public void Index(){
        while (true) {
            System.out.println("欢迎使用观影指栏管理器");
            System.out.println("1.添加电影");
            System.out.println("2.查看电影");
            System.out.println("3.显示人气最高电影");
            System.out.println("请选择");
            int i = INPUT.nextInt();
            switch(i){
                case 1:
                    serviceImpl.addMovie();
                    break;
                case 2:
                    serviceImpl.viewMovie();
                    break;
                case 3:
                    serviceImpl.mostPopularMovie();
                    break;
            }
        }
    }
}
